<?php
/**
 * Created by PhpStorm
 * User: 王帆
 * Date: 2020-07-13
 * Time: 11:04
 */
date_default_timezone_set('PRC'); //设置中国时区
// cli下运行
// >php pub.php -t BSD -k 123
// >php pub.php -t CGDD -k 123
// >php sub.php -t BSD -i 1
// >php sub.php -t CGDD -i 2

// topic数组
$topicArray = [
    'BSD' => [
        'key' => 'BSD',
        'name' => '报损单',
    ],
    'CGDD' => [
        'key' => 'CGDD',
        'name' => '采购订单'
    ],
    'CGRKD' => [
        'key' => 'CGRKD',
        'name' => '采购入库单'
    ],
    'XSD' => [
        'key' => 'XSD',
        'name' => '销售单'
    ],
    'XSDCKD' => [
        'key' => 'XSDCKD',
        'name' => '销售出库单'
    ],
];
// config配置文件
$config = [
    'server' => 'localhost',
    'port' => 1883,
    'username' => '',
    'password' => '',
    'publisher_client_id' => 'php-MQTT-publisherm',
    'subscriber_client_id' => 'php-MQTT-subscriberm',
];
return compact('topicArray','config');